home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15193 / PRINTIT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-05  |  347 b   |  31 lines

  1.  /* Filename: printit.cpp     Written by A. Kennedy */
  2.               // Send output directly to printer
  3.  #include <stdio.h>
  4.  #include <stdlib.h>
  5.  #include <conio.h>
  6.  
  7.  FILE *prnt;
  8.  
  9.  void main()
  10.  {
  11.     prnt = fopen("PRN", "w");   /* LTP1 would also work */
  12.     fprintf(prnt, "     This output was sent to the printer.");
  13.     fclose(prnt);
  14.  }
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.